package game;

//deklaration af variabler
public class Account {
	
	private int pointSum;
	
	//Opretter en integer sum i Account
	public Account(){
		pointSum = 30000;
	}
	
	//Metoder
	
	//Lægger point til sum i form af pSum. pSum kan ikke blive negativ
	public void addPoints(int sum){
		int pSum;
		pSum = pointSum + sum;
		if (pSum < 0)
		{
			pSum = 0;
		pointSum = pSum;
		}
		else
		pointSum = pSum;
	}
	
	//Henter point
	public int getPoint(){
		int sum;
		sum = pointSum;
		return sum;
	}
	
	//resetter point.
	public void resetPoints(){
		pointSum = 0;

	}

}
